3.2 Study the following algorithm: i = 0; while (!a [i].equals (element)) i++; Assume that a is an array of n elements and that there is at least one index k in 0 ... n - 1 such that a [k].equals (element). Use Big-O notation to estimate worstTime(n). Use Big-! and Big-" notation to estimate worstTime(n). In plain English, estimate worstTime(n). | |
| View Solution | |
| << Back | Next >> |